-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For Bug#1117 #1219
Merged
Merged
For Bug#1117 #1219
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ady in gyro_tensor.
…ghly more stable...
…ing of off-diagonal components
stevengj
reviewed
May 14, 2020
Does this PR also address #1084? |
@oskooi, no, improving memory usage for susceptibilities in general is a separate issue. As noted above, however, I think we can do better for the specific case of gyrotropic media. |
stevengj
reviewed
May 17, 2020
Thanks for looking into this, @seewhydee! |
bencbartlett
pushed a commit
to bencbartlett/meep
that referenced
this pull request
Sep 9, 2021
* Implement gyrotropic susceptibility class. * Add Python and Scheme support for gyrotropic media. * Initialize bias vector in python susceptibility struct. * Remove "bias" from gyrotropic_susceptibility; the information is already in gyro_tensor. * Add gyrotropic media to docs * Minor copyedit * Fix logic in py_susceptibility_to_susceptibility * In add_susceptibilities, always pass a 3-vector as gyrotropic bias * First try at gyrotropic media tutorial * Fix errors in gyrotropy formulas in notes * Re-implemention of gyrotropy using LLG equation * Tweak handling of sigma tensor in gyrotropic case * Update Python doc. * Drop 2pi factor from gyrotropic sigma * Doc updates * Fix last change to update_P * Fix printf typo * Remove spurious 2pi factor in alpha (which is not a rate) * Minor code tweak * Use a central-difference scheme for the LLG dynamics, which seems slighly more stable... * Try implementing the full nonlinear LLG equation * Add implicit static polarization to gyrotropy implementation * Put static P back in in subtract_P * Add gyrotropy example * Fix; use LOOP_OVER_VOL instead of LOOP_OVER_VOL_OWNED to ensure updating of off-diagonal components * Clamp the magnitude of the LLG polarization vector. * Revert inadvertent unrelated change to meep.i * Minor code cleanup * Flag "needs_W_notowned" for gyrotropic media * Update gyrotropic P components explicitly; don't use LOOP_OVER_VOL_OWNED * Enable needs_P on all components for gyrotropic media * Fix gyrotropy scheme to track 9 polarization components per unit cell. * Revert unrelated last change to meep.i * Avoiding need for allocation of P_tmp in gyrotropy_data. * Implement num_cinternal_notowned stuff for gyrotropic media * Update documentation for gyrotropic media, and relax some minor restrictions. * Add virtual keywords to gyrotropic_susceptibility methods * Merge latest changes from master * Remove gyrotropic-dispersion.py (incomplete attempt) * Complete merge * Update Materials.md to discuss both Lorentzian and LLG gyrotropic models * Introduce a new gyrotropy_model enum type, to allow for the LLG model. * More plumbing to provide support for Landau-Lifshitz-Gilbert type gyrotropy model * Fix typo in susceptibility update equation * Fix typos in Faraday rotation formula in docs * Merge from master * Reimplement linearized-LLG updating equations * Fix typo * Minor code clarification * Fix Faraday rotation example * For Landau-Lifshitz-Gilbert model, ignore the magnitude of the bias vector. * Fix minor hiccup in docs. * Support dumping and undumping of gyrotropic susceptibilities * Doc updates and minor tweaks accompanying last merge * Translate Faraday rotation tutorial from Python to Scheme * Fix typo in last change * Fix missing 2pi factor in gyrotropic LLG susceptibility's sigma parameter * Minor fixes for gyrotropy documentation * Add Faraday rotation unit test * Use absolute tolerance (in degrees) for Faraday rotation unit test * Add faraday rotation test to python/Makefile.am * Relax rules on needs_P for gyrotropic media (Bug#1117) * Remove gyrotropic_susceptibility::needs_P, falling back on parent version * Set gyrotropic_susceptibility::num_cinternal_notowned_needed as suggest by stevengj (NanoComp#1219) * Revert accidental code changes. * Whitespace fixes. * Whitespace changes. Co-authored-by: Chong Yidong <cyd@gnu.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This switches gyromagnetic media to use the default needs_P function, and modifies gyrotropic_susceptibility::update_P to handle the cases where sigma is NULL.
The Faraday rotation test case (https://meep.readthedocs.io/en/latest/Python_Tutorials/Gyrotropic_Media/) is unaffected, and the test case by @mojv doesn't crash anymore. I haven't performed any additional tests.
Fixes #1117.